import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
import store from './store'

import axios from 'axios'
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'

Vue.use(MintUI)

Vue.prototype.$http = axios

axios.defaults.baseURL = 'http://localhost:3000/api'
axios.interceptors.request.use(config => {
  config.headers.token = sessionStorage.getItem('token')
  // console.log(config)
  return config
})

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
